{extend name="admin@index_layout"/}
{block name="main"}
<form class="layui-form" method="post">

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">服务类型</label>-->
<!--        <div class="layui-input-block">-->
<!--            <select name="row[server_cate]" lay-verify="required">-->
<!--                <option value="">请选择服务类型</option>-->
<!--                {foreach $server_cate as $key}-->
<!--                <option value="{$key.id}" name="cate_id">{$key.name}</option>-->
<!--                {/foreach}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="row[name]" autocomplete="off" lay-verify="required" placeholder="名称"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">价格</label>
        <div class="layui-input-block">
            <input type="number" name="row[price]" autocomplete="off" lay-verify="required|priceNum" placeholder="价格"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">标签</label>
        <div class="layui-input-block">
            {:Form::text('row[tag]',$data.tag,["class"=>"form-tags","lay-verify"=>"required"])}
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">简介</label>
        <div class="layui-input-block">
            <textarea name="row[desc]" placeholder="请输入内容" class="layui-textarea"> </textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="row[sort]" lay-verify="required|number" autocomplete="off" placeholder="排序"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <div class="layui-input-block">
            <input type="text"   name="icon_img" id="c-pic" value="" class="layui-input">
        </div>
        <div class="layui-input-block">
            <button type="button" class="layui-btn faupload" id="faupload-pic" data-multiple="false"
                    data-input-id="c-pic"
                    data-preview-id="p-pic" data-type="image"><i class="layui-icon layui-icon-upload"></i> 上传
            </button>
            <button type="button" class="layui-btn fachoose" data-multiple="false" data-mimetype="image"
                    data-input-id="c-pic" id="fachoose-c-pic"><i class="iconfont icon-other"></i> 选择
            </button>
            <ul class="layui-row list-inline plupload-preview" id="p-pic"></ul>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">背景url</label>
        <div class="layui-input-block">
            <input type="text" lay-verify="required" name="bc_img" id="bc_img" value="" class="layui-input">
        </div>
        <div class="layui-input-block">
            <button type="button" class="layui-btn faupload" id="faupload-bc_img" data-multiple="false"
                    data-input-id="bc_img"
                    data-preview-id="bc_img2" data-type="image"><i class="layui-icon layui-icon-upload"></i> 上传
            </button>
            <button type="button" class="layui-btn fachoose" data-multiple="false" data-mimetype="image"
                    data-input-id="c-pic" id="fachoose-bc_img"><i class="iconfont icon-other"></i> 选择
            </button>
            <ul class="layui-row list-inline plupload-preview" id="bc_img2"></ul>
        </div>
    </div>

    <div class="layui-form-item" style="">
        <label class="layui-form-label">内容详情</label>
        <div class="layui-input-block">
            <script type="text/plain" class="js-ueditor" name="content"
                    style="width:850px;height:200px;position: relative;z-index: 1 !important;"
                    id="content"></script>
        </div>
    </div>


    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit>提交</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use(['yznForm', 'laydate'], function () {
        var yznForm = layui.yznForm,
            laydate = layui.laydate;
        yznForm.bindevent($("form.layui-form"));
        laydate.render({
            elem: '#ID-laydate'
        });
    });
</script>
{/block}